package com.aistar.hotel.service.impl;


import com.aistar.common.util.IdWorker;
import com.aistar.hotel.entity.HotelPictures;
import com.aistar.hotel.mapper.HotelPicturesMapper;
import com.aistar.hotel.service.HotelPicturesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * Created by wubin on 2019/6/23.
 */
@Service
@Transactional
public class HotelPicturesServiceImpl implements HotelPicturesService {
    @Autowired
    private HotelPicturesMapper hotelPicturesMapper;
    @Autowired
    private IdWorker idWorker;
    @Override
    public List<HotelPictures> findAll(String picturessrc) {
        return hotelPicturesMapper.findAll(picturessrc);
    }

    @Override
    public HotelPictures findById(String id) {
        return hotelPicturesMapper.findById(id);
    }

    @Override
    public void save(HotelPictures hotelPictures) {

        hotelPicturesMapper.save(hotelPictures);
    }

    @Override
    public void delete(String id) {
hotelPicturesMapper.delete(id);
    }

    @Override
    public void update(HotelPictures hotelPictures) {

        hotelPicturesMapper.update(hotelPictures);
    }
}
